import request from '@/utils/request.js';

// 获取学段
export function getStageApi(data) {
    return request.httpTokenRequest({
        url: 'paper/getStage',
        method: 'GET'
    }, data)
}

// 获取版本
export function getVersionApi(data) {
    return request.httpTokenRequest({
        url: 'paper/getVersion',
        method: 'GET'
    }, data)
}

// 获取上下册
export function getTextBooksApi(data) {
    return request.httpTokenRequest({
        url: 'paper/getTextBooks',
        method: 'GET'
    }, data)
}

// 获取单元
export function getUnitApi(data) {
    return request.httpTokenRequest({
        url: 'paper/getUnit',
        method: 'GET'
    }, data)
}


// 获取试卷
export function getPaperApi(data) {
    return request.httpTokenRequest({
        url: 'paper/getPaper',
        method: 'GET'
    }, data)
}

// 开始考试
export function paperExamApi(data) {
    return request.httpTokenRequest({
        url: 'paper/exam',
        method: 'POST'
    }, data)
}


// 试卷详情
export function getPaperExamDetailApi(data) {
    return request.httpTokenRequest({
        url: 'paper_exam/detail',
        method: 'GET'
    }, data)
}


// 试题详情
export function getPaperExamQuestionApi(data) {
    return request.httpTokenRequest({
        url: 'paper_exam/question',
        method: 'GET'
    }, data)
}

// 记录答题数据
export function addAnswerRecordApi(data) {
    return request.httpTokenRequest({
        url: 'paper_exam/addAnswerRecord',
        method: 'POST'
    }, data)
}


// 请求交卷接口
export function paperExamHandleApi(data) {
    return request.httpTokenRequest({
        url: 'paper_exam/updateExamRecord',
        method: 'POST'
    }, data)
}